package org.jeecg.common.modules.doctor.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.modules.doctor.entity.DoctorSchedule;
import org.jeecg.common.modules.doctor.mapper.DoctorScheduleMapper;
import org.jeecg.common.modules.doctor.service.IDoctorScheduleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: doctor_schedule
 * @Author: jeecg-boot
 * @Date:   2020-08-22
 * @Version: V1.0
 */
@Service
public class DoctorScheduleServiceImpl extends ServiceImpl<DoctorScheduleMapper, DoctorSchedule> implements IDoctorScheduleService {

    @Override
    public List<DoctorSchedule> queryByDoctorId(String doctorId,String hospitalId) {
        LambdaQueryWrapper<DoctorSchedule> query = Wrappers.lambdaQuery();
        query.eq(DoctorSchedule::getDoctorId,doctorId);
        query.eq(DoctorSchedule::getHospitalId,hospitalId);
        return list(query);
    }
}
